import { FetchService } from '@/utils'
/**
 * RESTful风格接口
 * @class
 */
export default class {
	public http: FetchService
	public constructor(http: FetchService) {
		this.http = http
	}

	/**
	 * 类型和组织都会返回
	 * @method
	 * @name #AllExternalMulPublicApiPOST
	 * @param {string} tenantId - tenant_id
	 */
	public async AllExternalMulPublicApiPOST(params: {
		query?: {
			tenantId?: string
		}
	}): Promise<typing.baseInfo.PlainResult$AllExternalDepartmentDto$> {
		let path = ''
		path = '/api/public/mul/external/all'
		let body: any
		const queryParameters: any = {}

		if (params.query?.['tenantId'] !== undefined) {
			queryParameters['tenant_id'] = params.query['tenantId']
		}

		const result: typing.baseInfo.PlainResult$AllExternalDepartmentDto$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 获取租户的License
	 * @method
	 * @name #GetLicenseTenantPublicApiPOST
	 * @param {} req - req
	 */
	public async GetLicenseTenantPublicApiPOST(params: {
		payload?: typing.baseInfo.RequestBean
	}): Promise<typing.baseInfo.PlainResult$TenantAuthDto$> {
		let path = ''
		path = '/api/public/tenant/getLicense'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.baseInfo.PlainResult$TenantAuthDto$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 根据租户id查询租户信息
	 * @method
	 * @name #GetTenantDetailTenantPublicApiPOST
	 */
	public async GetTenantDetailTenantPublicApiPOST(params?: {}): Promise<typing.baseInfo.PlainResult$TenantDetailDto$> {
		let path = ''
		path = '/api/public/tenant/getTenantDetail'
		let body: any
		const queryParameters: any = {}

		const result: typing.baseInfo.PlainResult$TenantDetailDto$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 更新语言类型
	 * @method
	 * @name #SetLocalTenantPublicApiPOST
	 * @param {string} localLanguage - localLanguage
	 */
	public async SetLocalTenantPublicApiPOST(params: {
		query?: {
			localLanguage?: string
		}
	}): Promise<typing.baseInfo.PlainResult$boolean$> {
		let path = ''
		path = '/api/public/tenant/setLocal'
		let body: any
		const queryParameters: any = {}

		if (params.query?.['localLanguage'] !== undefined) {
			queryParameters['localLanguage'] = params.query['localLanguage']
		}

		const result: typing.baseInfo.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 登录用户自己的组织列表
	 * @method
	 * @name #ListExternalMulDeptPrivateV1POST
	 */
	public async ListExternalMulDeptPrivateV1POST(params?: {}): Promise<typing.baseInfo.ListResult$ExternalDepartmentDto$> {
		let path = ''
		path = '/v1/private/dept/mul/external/list'
		let body: any
		const queryParameters: any = {}

		const result: typing.baseInfo.ListResult$ExternalDepartmentDto$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 获取内部组织列表
	 * @method
	 * @name #PageInternalMulDeptPrivateV1POST
	 * @param {} orgQueryDto - orgQueryDto
	 */
	public async PageInternalMulDeptPrivateV1POST(params: {
		payload?: typing.baseInfo.OrgQueryDto
	}): Promise<typing.baseInfo.PageResult$InternalDepartmentDto$> {
		let path = ''
		path = '/v1/private/dept/mul/internal/page'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.baseInfo.PageResult$InternalDepartmentDto$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 登录后自动切换到此默认部门
	 * @method
	 * @name #SetDefaultDeptInternalMulDeptPrivateV1POST
	 * @param {} updateDefaultDeptDto - updateDefaultDeptDto
	 */
	public async SetDefaultDeptInternalMulDeptPrivateV1POST(params: {
		payload?: typing.baseInfo.UpdateDefaultDeptDto
	}): Promise<typing.baseInfo.PlainResult$boolean$> {
		let path = ''
		path = '/v1/private/dept/mul/internal/setDefaultDept'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.baseInfo.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 切换外部组织
	 * @method
	 * @name #SwitchDeptExternalEmployeePrivateV1POST
	 * @param {string} deptId - dept_id
	 * @param {string} employeeId - employee_id
	 */
	public async SwitchDeptExternalEmployeePrivateV1POST(params: {
		query?: {
			deptId?: string
			employeeId?: string
		}
	}): Promise<typing.baseInfo.PlainResult$boolean$> {
		let path = ''
		path = '/v1/private/employee/external/switchDept'
		let body: any
		const queryParameters: any = {}

		if (params.query?.['deptId'] !== undefined) {
			queryParameters['dept_id'] = params.query['deptId']
		}

		if (params.query?.['employeeId'] !== undefined) {
			queryParameters['employee_id'] = params.query['employeeId']
		}

		const result: typing.baseInfo.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 只返回用户基本信息，不返回是否是应用管理员、管控台管理员
	 * @method
	 * @name #GetCurrentUserEmployeePrivateV1POST
	 */
	public async GetCurrentUserEmployeePrivateV1POST(params?: {}): Promise<typing.baseInfo.PlainResult$EmployeeDto$> {
		let path = ''
		path = '/v1/private/employee/getCurrentUser'
		let body: any
		const queryParameters: any = {}

		const result: typing.baseInfo.PlainResult$EmployeeDto$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 切换部门
	 * @method
	 * @name #SwitchDeptEmployeePrivateV1POST
	 * @param {string} deptId - deptId
	 * @param {string} labelId - labelId
	 */
	public async SwitchDeptEmployeePrivateV1POST(params: {
		query?: {
			deptId?: string
			labelId?: string
			defaultOrg?: boolean
		}
	}): Promise<typing.baseInfo.PlainResult$boolean$> {
		let path = ''
		path = '/v1/private/employee/switchDept'
		let body: any
		const queryParameters: any = {}

		if (params.query?.['deptId'] !== undefined) {
			queryParameters['deptId'] = params.query['deptId']
		}

		if (params.query?.['labelId'] !== undefined) {
			queryParameters['labelId'] = params.query['labelId']
		}
		if (params.query?.['defaultOrg'] !== undefined) {
			queryParameters['defaultOrg'] = params.query['defaultOrg']
		}

		const result: typing.baseInfo.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 添加已读记录
	 * @method
	 * @name #AddGuideUserPrivateV1POST
	 * @param {} type - type
	 */
	public async AddGuideUserPrivateV1POST(params: {
		payload?: Array<string>
	}): Promise<typing.baseInfo.PlainResult$boolean$> {
		let path = ''
		path = '/v1/private/user/guide/add'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.baseInfo.PlainResult$boolean$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 已读列表
	 * @method
	 * @name #ListGuideUserPrivateV1POST
	 * @param {} type - type
	 */
	public async ListGuideUserPrivateV1POST(params: {
		payload?: Array<string>
	}): Promise<typing.baseInfo.ListResult$UserGuideDto$> {
		let path = ''
		path = '/v1/private/user/guide/list'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.baseInfo.ListResult$UserGuideDto$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
	/**
	 * 外部组织登录
	 * @method
	 * @name #LoginExternalMulPwdPublicV1POST
	 * @param {} loginBo - loginBo
	 */
	public async LoginExternalMulPwdPublicV1POST(params: {
		payload?: typing.baseInfo.LoginBo
	}): Promise<typing.baseInfo.PlainResult$MulExtEmpInfoPo$> {
		let path = ''
		path = '/v1/public/pwd/mul/external/login'
		let body: any
		const queryParameters: any = {}

		if (params.payload !== undefined) {
			body = params.payload
		}

		const result: typing.baseInfo.PlainResult$MulExtEmpInfoPo$ =
			await this.http.request({
				method: 'POST',
				url: path,
				params: queryParameters,
				payload: body,
			})
		return result
	}
}
